package middleware

import (
	"cms/model"
	"html/template"
)

func Adv(position string) template.HTML {
	if position == "" {
		return ""
	}
	adv := model.Adv{}
	info, err := adv.InfoByPosition(position)
	if err != nil {
		return ""
	}
	return template.HTML(info.Content)
}
